// const { defineConfig } = require('@vue/cli-service')
let ip=1
module.exports = {
	devServer: {
      proxy: {
      '/driver': {// 匹配所有以 '/api1'开头的请求路径
        target: ip==1?'http://43.136.58.34:8080/driver':'http://192.168.2.177/driver',// 代理目标的基础路径
        changeOrigin: true,
        pathRewrite: {'^/driver': ''}
      },
      '/api2': {// 匹配所有以 '/api2'开头的请求路径
        target: 'http://localhost:5001',// 代理目标的基础路径
        changeOrigin: true,
        pathRewrite: {'^/api2': ''}
      } 
    }
  },
  chainWebpack: config => {
    config
      .plugin('html')
      .tap(args => {
        args[0].title = "你的标题";
        return args
    })
  }
}
